//
//  LeScene.cpp
//  Leste
//
//  Created by 王乐 on 2022/1/27.
//

#include "LeScene.h"


LeScene* LeScene::instance = nullptr;

LeScene *LeScene::getInstance() { 
    if (instance == nullptr)
        instance = new LeScene();
    return instance;
}

LeScene::LeScene() {
}

LeScene::LeScene(const LeScene &) {
    
}

void LeScene::Initialize() { 
    m_GameObjectManager.initializeGameObjects();
}

void LeScene::Awake() { 
    m_GameObjectManager.Awake();
}

void LeScene::PreRender() { 
    m_GameObjectManager.PreRender();
}

void LeScene::Start() { 
    m_GameObjectManager.Start();
}


void LeScene::RenderSelection()
{
    m_GameObjectManager.RenderSelection();
}

void LeScene::Update() { 
    m_GameObjectManager.Update();
}

void LeScene::FixedUpdate() { 
    m_GameObjectManager.FixedUpdate();
}

void LeScene::Render() { 
    m_GameObjectManager.Render();
}

void LeScene::PostRender() { 
    m_GameObjectManager.PostRender();
}

void LeScene::PostWorldStep()
{
    m_GameObjectManager.PostWorldStep();
}

void LeScene::addGameObjIDtoDestroy(unsigned int ID)
{
    m_GameObjectManager.addGameObjIDtoDestroy(ID);
}

void LeScene::DestroyGameObjectsByIDs()
{
    m_GameObjectManager.destroyGameObjectsByIDs();
}

void LeScene::addGameObject(LeGameObject *newobj)
{
    m_GameObjectManager.addGameObject(newobj);
}

void LeScene::UpdateCurMouseHoverID()
{
    m_GameObjectManager.updateCurMouseHoverID();
}

unsigned int LeScene::getCurMouseHoverID()
{
    return m_GameObjectManager.getCurMouseHoverId();
}

void LeScene::PostprocessingSetup()
{
    m_GameObjectManager.PostprocessingSetup();
}

